#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include "mythread.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
public slots:
    void dealTimeout();//定时器槽函数
    void dealDone(); //线程结束槽函数
    void stopThread(); //关闭线程槽函数
private slots:
    void on_pBtnStart_clicked();

    void on_pBtnStop_clicked();

private:
    Ui::Widget *ui;
    QTimer *myTimer;  //申明变量
    myThread *thread; //线程对象
};
#endif // WIDGET_H
